﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/FrontEnd.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <% Partner obj = (Partner)ViewData.Model;
       Response.Write(Html.Encode(obj.PartnerName));    %>
    - vuonthieunhi.com
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="BreadCrumbContent" runat="server">
    <div class="breadcrumb">
        <span><a title="Chào mừng bạn đến với Vườn Thiếu Nhi." href="/">Trang chủ</a>&nbsp;&nbsp;
            <img src="../../Themes/images/breadcrumb_separator.gif" />&nbsp;
            <%=(string)ViewData["BreadCumb"] %></span>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Partner obj = (Partner)ViewData.Model;%>
    <form id="orderQuantity" action="post">
    <div class="prodmain_box">
        <div class="roundedcornr_top">
            <div>
            </div>
        </div>
        <div class="roundedcornr_content">
            <div class="product_name">
                <span>
                    <%= Html.Encode(obj.PartnerName)%></span>
            </div>
            <hr>
            <div class="product_vertline">
                <div class="product_images">
                    <img width="300" name="pimage7112" title="<%=Html.Encode(obj.PartnerName)%>" id="fullimg"
                        alt="<%=Html.Encode(obj.PartnerName)%>" src="<%= Constants.UPLOAD_VITUAL_IMAGE_PATH + obj.BigImages%>">
                </div>
                <div class="product_info">
                    <% if (obj.ManufacturerID.HasValue)
                       { %>
                    <div class="center_content">
                        <img width="150" src="<%= Constants.UPLOAD_VITUAL_MANUFACTURER_PATH + obj.Manufacturer.Images%>"></div>
                    <hr />
                    <%} %>
                    <span class="boldtext">Độ tuổi:</span> <em>
                        <%= Html.Encode(obj.Age) %>
                    </em>
                    <hr />
                    <span class="boldtext">Kích Thước:</span> <em>
                        <%= Html.Encode(obj.Dimension) %></em>
                    <hr />
                    <span class="boldtext">Màu sắc:</span> <em>
                        <%= Html.Encode(obj.Color) %></em>
                    <hr />
                    <span class="boldtext">Mã số:</span> <em>
                        <%= Html.Encode(obj.ID) %></em>
                    <hr />
                    <span class="boldtext">Tình trạng:</span> <em>
                        <%= Html.Encode(obj.Status) %></em>
                    <hr />
                    <span class="boldtext">Lượt xem:</span> <em>
                        <%= Html.Encode(obj.Views)%></em>
                    <hr />
                    <span class="boldtext">Xuất xứ:</span> <em>
                        <%= Html.Encode(obj.ManufacturerID.HasValue?obj.Manufacturer.Country:string.Empty) %></em>
                    <hr />
                    <% if (obj.OldPrice.HasValue)
                       { %>
                    <div class="pricebg_special">
                        <table class="prodprice_special">
                            <tbody>
                                <tr>
                                    <td>
                                        <em>Giảm giá !</em><br />
                                        <%=(!obj.CurrentPrice.HasValue? "Liên hệ" : String.Format("{0:0,0}", obj.CurrentPrice))%>
                                        <div class="prodrrpprice">
                                            <%=(!obj.OldPrice.HasValue ? "Liên hệ" : String.Format("{0:0,0}", obj.OldPrice))%>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <%}
                       else
                       {%>
                    <div class="pricebg">
                        <table class="prodprice">
                            <tbody>
                                <tr>
                                    <td>
                                        <%=(!obj.CurrentPrice.HasValue? "Liên hệ" : String.Format("{0:0,0}", obj.CurrentPrice))%>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <%}     %>
                    <hr />
                    <span class="boldtext">Số lượng:</span> <em>
                        <%= Html.TextBox("Quality",1, new {@style="width:80px",@maxlength="3",@class="required number min" })%>
                        <%= Html.Hidden("ProductID",obj.ID)%>
                    </em>
                    <input id="btnOrder" type="submit" name="add to cart" value=" Đặt hàng " class="orderbtn" />
                </div>
            </div>
            <div class="product_description">
                <hr />
                <span class="boldtext">Thông tin chi tiết:</span><br />
                <%= obj.Description %>
            </div>
        </div>
        <div class="roundedcornr_bottom">
            <div>
            </div>
        </div>
    </div>
    </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MetaContent" runat="server">
    <% Partner obj = (Partner)ViewData.Model;  %>
    <meta name='keywords' content='<%=obj.PartnerName%>' />
    <meta name='description' content='<%=obj.PartnerName%>' />
    <script type="text/javascript">
        $(document).ready(function () {
            $("#orderQuantity").validate({
                errorElement: "span",
                errorPlacement: function (error, element) {
                    error.insertAfter($("#btnOrder"));
                },
                rules:
                {
                    Quality: { min: 1 }
                },
                messages: {
                    Quality: {
                        required: "Ô bắt buộc phải nhập  ",
                        number: "Ô chỉ được nhập số ",
                        min: "Số lượng phải lớn hơn 0"
                    }
                },
                submitHandler: function () {
                    func.addToCart();
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="TopTitleContent" runat="server">
    <%=(string)ViewData["TitleHeader"]%>
</asp:Content>
